package com.nervenets.web.hibernate.dao;

import com.nervenets.web.hibernate.domain.Manager;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

@Repository
public interface ManagerDao extends JpaRepository<Manager, Long>, JpaSpecificationExecutor<Manager> {
    Manager findManagerByMobile(String mobile);

    Manager findManagerByMobileAndPassword(String mobile, String password);

    Page<Manager> findAllByRemoved(int removed, Pageable pageable);
}
